import request from '@/utils/request'

const {
  get: $get,
  post: $post,
  delete: $delete,
  download: $download
} = request

//监测预警统计分析 type:1.预警趋势2.报警数量3.预警等级4.报警等级
export const alarmList = data => {
  return $get('/alarm/alarmStatistics/alarmList', data)
}

export const modeStatistics = data => {
  return $get('/alarm/alarmWarning/modeStatistics', data)
}

export const zhongheStatistics = data => {
  return $get('/alarm/alarmWarning/zhongheStatistics', data)
}


export const alarmListArea = data => {
  return $get('/alarm/alarmStatistics/alarmListArea', data)
}

export const alarmListAreaWarnLevel = data => {
  return $get('/alarm/alarmStatistics/alarmListAreaWarnLevel', data)
}
export const alarmListAreaWarn = data => {
  return $get('/alarm/alarmStatistics/alarmListAreaWarn', data)
}

export const alarmListAreaExport = (data,fileName) => {
  return $download('/alarm/alarmStatistics/alarmListAreaExport',data, fileName)
}
// 全省监测导出word报告
export const arlrmWordExport = (data, fileName) =>{
  return $download('/alarm/alarmStatistics/analysisReportExport',data, fileName)
}

//============ 监测预警总览接口
//后台监测预警总览:1.基础设施2.历史报警数量3.报警排名4.监测设备数量 5.历史预警趋势6.历史预警级别趋
export const alarmListAllOverview = data =>{
  return $get('/alarm/alarmStatistics/alarmListAll',data)
}

// 监测设备数
export const deviceStatistics = data=>{
  return $get("/alarm/alarmStatistics/deviceStatistics",data)
}

//今日报警预警数
export const alarmDayListAll = data=>{
  return $get('/alarm/alarmStatistics/alarmDayListAll',data)
}

// 地区报警预警分布
export const areaAlarmWarnList = data=>{
  return $get('/alarm/alarmStatistics/areaAlarmWarnList', data)
}

// 报警趋势
export const alarmRecordTrend =data =>{
  return $get('/alarm/alarmStatistics/alarmRecordTrend', data)
}

// 预警趋势
export const alarmWarningTrend =data =>{
  return $get('/alarm/alarmStatistics/alarmWarningTrend', data)
}

// 报警统计
export const alarmStatistics = data =>{
  return $get('/alarm/alarmStatistics/alarmStatistics', data)
}

// 预警统计
export const waringStatistics = data =>{
  return $get('/alarm/alarmStatistics/waringStatistics', data)
}

// 基础设施
export const baseNumStatistics = data =>{
  return $get('/alarm/alarmStatistics/baseNumStatistics', data)
}

//============

// =================报警处置统计分析

// 报警趋势统计
export const alarmHandlingTrend = data =>{
  return $get('/alarm/alarmStatistics/alarmHandlingTrend', data)
}

// 报警区域分布
export const alarmHandingAmount = data =>{
  return $get('/alarm/alarmStatistics/alarmHandingAmount', data)
}

// 报警等级分布
export const alarmHandingLevel = data =>{
  return $get('/alarm/alarmStatistics/alarmHandingLevel', data)
}

// 报警类别分布
export const alarmHandingType = data =>{
  return $get('/alarm/alarmStatistics/alarmHandingType', data)
}

// 报警处置统计信息
export const alarmHandingTable = data =>{
  return $get('/alarm/alarmStatistics/alarmHandingTable', data)
}

// 报警处置统计信息导出
export const alarmHandingTableExport = (data,fileName) =>{
  return $download('/alarm/alarmStatistics/alarmHandingTableExport',data, fileName)
}

// =====================
// 预警类型统计
export const warnCvWarnTypesDistribution = data =>{
  return $get('/alarm/alarmStatistics/cv/warnTypesDistribution', data)
}
